import requests


def download(url, filename):
    r = requests.get(url, stream=True)
    with open(filename, 'wb') as f:
        for chunk in r.iter_content(chunk_size=1024):
            if chunk:
                f.write(chunk)
    return filename


if __name__ == '__main__':
    url = 'https://resources.jetbrains.com/help/img/idea/2024.1/app.actions.execute_dark.svg'
    filename = 'app.actions.execute_dark.svg'
    download(url, filename)
